import instance from '@/http/index'

/**
 *
 * @param {*} data
 * @returns
 * @zs 登录的接口
 */

export const login = data => {
  const { account, password } = data
  return instance({
    url: '/api/login',
    method: 'POST',
    data: {
      account,
      password
    }
  })
}

/**
 * 
 * @param {*} data 
 * @returns 
 * @zs 注册的接口
 */
export const register = data => {
  const { account, password } = data
  return instance({
    url: '/api/register',
    method: 'POST',
    data: {
      account,
      password
    }
  })
}
